<%@page import="br.com.skpharma.vo.*,br.com.skpharma.dao.*,java.util.*" contentType="text/html; charset=ISO-8859-1"%>
<%
DAOLaboratorio daoLaboratorio = new DAOLaboratorio();
int codigo = Integer.parseInt(request.getParameter("cod_lab"));
daoLaboratorio.obter(codigo);

if(request.getParameter("Salvar") != null){
	daoLaboratorio.getLaboratorioVO().setDs(request.getParameter("descricao"));	
	daoLaboratorio.editar();
%>
	<jsp:forward page="index.jsp"/>
<%
}

if(request.getParameter("Excluir") != null){
	daoLaboratorio.excluir();
%>
	<jsp:forward page="index.jsp"/>
<%
}
%>

<html>


<head>
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css">
</head>

<body>

<p align="center">Alterar Cadastro de Laboratorios</p>

<form method="POST" action="alterar.jsp">
  <input type="hidden" name="cod_lab" value="<%=daoLaboratorio.getLaboratorioVO().getCod()%>">
  <div align="center"><center>
  <table border="1" height="103" style="font-size:9px">
    <tr>
      <td width="50%" height="23">Descricao:</td>
      <td width="50%" height="23"><input style="font-size:9px" type="text" name="descricao" size="20" value="<%=daoLaboratorio.getLaboratorioVO().getDs()%>"></td>
    </tr>
    <tr>
      <td width="100%" height="19" colspan="2"><div align="center"><center><p>
	<input type="submit" style="font-size:9px" value="Salvar" name="Salvar">
	<input type="submit" style="font-size:9px" value="Excluir" name="Excluir"></td>
    </tr>
  </table>
  </center></div>
</form>
</body>
</html>
